package com.ruoyi.applet.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import com.ruoyi.applet.mapper.MiniBrandModelMapper;
import com.ruoyi.applet.domain.MiniBrandModel;
import com.ruoyi.applet.service.IMiniBrandModelService;

import javax.annotation.Resource;

/**
 * 汽车型号Service业务层处理
 *
 * @author liucan
 * @date 2024-04-08
 */
@Service
public class MiniBrandModelServiceImpl implements IMiniBrandModelService {
    @Resource
    private MiniBrandModelMapper miniBrandModelMapper;

    /**
     * 查询汽车型号
     *
     * @param id 汽车型号主键
     * @return 汽车型号
     */
    @Override
    public MiniBrandModel selectMiniBrandModelById(Long id) {
        return miniBrandModelMapper.selectMiniBrandModelById(id);
    }

    /**
     * 查询汽车型号列表
     *
     * @param miniBrandModel 汽车型号
     * @return 汽车型号
     */
    @Override
    public List<MiniBrandModel> selectMiniBrandModelList(MiniBrandModel miniBrandModel) {
        return miniBrandModelMapper.selectMiniBrandModelList(miniBrandModel);
    }

    /**
     * 新增汽车型号
     *
     * @param miniBrandModel 汽车型号
     * @return 结果
     */
    @Override
    public int insertMiniBrandModel(MiniBrandModel miniBrandModel) {
        return miniBrandModelMapper.insertMiniBrandModel(miniBrandModel);
    }

    /**
     * 修改汽车型号
     *
     * @param miniBrandModel 汽车型号
     * @return 结果
     */
    @Override
    public int updateMiniBrandModel(MiniBrandModel miniBrandModel) {
        return miniBrandModelMapper.updateMiniBrandModel(miniBrandModel);
    }

    /**
     * 批量删除汽车型号
     *
     * @param ids 需要删除的汽车型号主键
     * @return 结果
     */
    @Override
    public int deleteMiniBrandModelByIds(Long[] ids) {
        return miniBrandModelMapper.deleteMiniBrandModelByIds(ids);
    }

    /**
     * 删除汽车型号信息
     *
     * @param id 汽车型号主键
     * @return 结果
     */
    @Override
    public int deleteMiniBrandModelById(Long id) {
        return miniBrandModelMapper.deleteMiniBrandModelById(id);
    }
}
